From 1c2f44a9e7871d4e0f4868e767490a32bf465c59 Mon Sep 17 00:00:00 2001 From: robertl Date: Wed, 11 Sep 2002 06:53:27 +0000 Subject: [PATCH] Delete unused vars, misc warning cleanups. --- gpsbabel/cetus.c | 1 - gpsbabel/csv.c | 11 +---------- gpsbabel/defs.h | 2 ++ gpsbabel/gpspilot.c | 1 - gpsbabel/magnav.c | 7 ++----- gpsbabel/magproto.c | 2 +- gpsbabel/mapsend.c | 1 - gpsbabel/mkshort.c | 7 ++++--- 8 files changed, 10 insertions(+), 22 deletions(-) diff --git a/gpsbabel/cetus.c b/gpsbabel/cetus.c index 9ed9fd933..8443adaa4 100644 --- a/gpsbabel/cetus.c +++ b/gpsbabel/cetus.c @@ -122,7 +122,6 @@ data_read(void) wpt_tmp->position.latitude.degrees = pdb_read4(&rec->latitude) / 10000000.0; if (rec->year != 0xff) { struct tm tm = {0}; - time_t tval; tm.tm_min = rec->min; tm.tm_hour = rec->hour; diff --git a/gpsbabel/csv.c b/gpsbabel/csv.c index f97b20887..abfef221b 100644 --- a/gpsbabel/csv.c +++ b/gpsbabel/csv.c @@ -59,13 +59,9 @@ wr_deinit(void) static void data_read(void) { - char name[9], desc[80]; + char desc[80]; char *odesc = desc; double lat,lon; - char latdir, londir; - long alt; - char alttype; - char icon[3] = {0}; waypoint *wpt_tmp; while( fscanf(file_in, "%lf,%lf,%80[^\n]", @@ -91,11 +87,6 @@ static void gpsutil_disp(waypoint *wpt) { double lon,lat; - signed int ilon, ilat; - const char *icon_token = "0"; - char tbuf[1024]; - char *tp = tbuf; - time_t tm = wpt->creation_time; lon = wpt->position.longitude.degrees; lat = wpt->position.latitude.degrees; diff --git a/gpsbabel/defs.h b/gpsbabel/defs.h index f6e97fa6f..9ca580c85 100644 --- a/gpsbabel/defs.h +++ b/gpsbabel/defs.h @@ -111,6 +111,8 @@ void route_init(void); void waypt_disp(waypoint *); void fatal(const char *, ...); ff_vecs_t *find_vec(char *); +void disp_vecs(void); + void printposn(coord *c, int is_lat); diff --git a/gpsbabel/gpspilot.c b/gpsbabel/gpspilot.c index d79097588..3278ad6bd 100644 --- a/gpsbabel/gpspilot.c +++ b/gpsbabel/gpspilot.c @@ -191,7 +191,6 @@ abort(); opdb->version = 0; } - ff_vecs_t gpspilot_vecs = { rd_init, wr_init, diff --git a/gpsbabel/magnav.c b/gpsbabel/magnav.c index dc249fe35..fc52e436b 100644 --- a/gpsbabel/magnav.c +++ b/gpsbabel/magnav.c @@ -204,12 +204,9 @@ compare(const void *a, const void *b) static void data_write(void) { - int i, ct = waypt_count(); - struct hdr *htable, *bh; + int ct = waypt_count(); + struct hdr *htable; queue *elem, *tmp; - extern queue waypt_head; - waypoint *waypointp; -abort(); if (NULL == (opdb = new_pdb())) { fatal (MYNAME ": new_pdb failed\n"); diff --git a/gpsbabel/magproto.c b/gpsbabel/magproto.c index 197dbddd0..a60a7a9bf 100644 --- a/gpsbabel/magproto.c +++ b/gpsbabel/magproto.c @@ -318,7 +318,7 @@ if (debug_serial) mag_error = 1; return; } - if (IS_TKN("$PMGNCMD,END") || is_file && feof(magfile_in)) { + if (IS_TKN("$PMGNCMD,END") || (is_file && (feof(magfile_in)))) { found_done = 1; return; } diff --git a/gpsbabel/mapsend.c b/gpsbabel/mapsend.c index d5d9d0d9c..0e4dd6e96 100644 --- a/gpsbabel/mapsend.c +++ b/gpsbabel/mapsend.c @@ -38,7 +38,6 @@ test_endianness(void) long l; unsigned char uc[sizeof (long)]; } u; - unsigned int i; u.l = 1; i_am_little_endian = u.uc[0]; diff --git a/gpsbabel/mkshort.c b/gpsbabel/mkshort.c index 932390c0a..c943a0322 100644 --- a/gpsbabel/mkshort.c +++ b/gpsbabel/mkshort.c @@ -1,4 +1,6 @@ #include +#include +#include static const char vowels[] = "aeiouAEIOU"; @@ -18,8 +20,7 @@ static char * delete_last_vowel(int start, char *istring, int *replaced) { - int i,l; - char *ostring; + int l; /* * Basically impelement strrchr. @@ -82,7 +83,7 @@ mkshort(char *istring) char *tstring; char *cp; char *np; - int i,j,l, nlen, replaced; + int i, l, nlen, replaced; if (!ostring) { -- 2.30.2